import { pageOpeTypeEnum } from '@/common';
import type { TemplatePreviewDrawerProps } from '@/pages/PlanManage/StudyPlan/components/interface';
export interface StudyPlanChildProps {
  onSubSuccess?: () => void;
  onSubError?: () => void;
  onStudyPlanMethodChange: (type: '200' | '100') => void;
  learnMethod: '200' | '100';
  onStudyPlanTypeChange: (type: 'circle' | 'fixed') => void;
  studyPlanType: 'circle' | 'fixed';
  type: keyof typeof pageOpeTypeEnum;
  planCourseId?: string;
  previewDetail?: TemplatePreviewDrawerProps['prevDetail'];
}

export interface StudyPlanChildRef {
  onSubPublish: () => void;
  onSubSave?: () => void;
}

export interface IStudyPackage {
  id?: string;
  packageType: string;
  sourceType: string;
  sourceGuid?: string | undefined;
  isCharge: number;
  studyList: any[];
  examList?: any[];
  pageType?: string;
}

export enum ECoursewareTypeToType {
  'vido' = '100',
  'txt' = '200',
  'pdf' = '400',
  'paper' = '300',
}

export const CoursewareGroupToTypeObj: Record<string, string> = {
  '600': '300',
  '700': '100',
  '800': '200',
  '900': '400',
};
